<?php
/* @var $this \yii\web\View */
/* @var $content string */
use backend\assets\AppAsset;
use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use common\widgets\Alert;
use mdm\admin\components\MenuHelper;

AppAsset::register($this);
$controller = '/' . Yii::$app->controller->route;
$menu = MenuHelper::getAssignedMenu(Yii::$app->user->id, null, null, true);
?>
<?php $this->beginPage()?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
<meta charset="<?= Yii::$app->charset ?>">
<link rel="shortcut icon"
	href="/bsadmin//bsadmin/assets/img/favicon.png" type="image/x-icon">
<meta name="viewport" content="width=device-width, initial-scale=1">
        <?= Html::csrfMetaTags()?>
        <title><?= Html::encode($this->title) ?></title>
        <?php $this->head()?>
    </head>
<body>
        <?php $this->beginBody()?>
        <!-- Loading Container -->
	<div class="loading-container">
		<div class="loading-progress">
			<div class="rotator">
				<div class="rotator">
					<div class="rotator colored">
						<div class="rotator">
							<div class="rotator colored">
								<div class="rotator colored"></div>
								<div class="rotator"></div>
							</div>
							<div class="rotator colored"></div>
						</div>
						<div class="rotator"></div>
					</div>
					<div class="rotator"></div>
				</div>
				<div class="rotator"></div>
			</div>
			<div class="rotator"></div>
		</div>
	</div>
	<!--  /Loading Container -->
	<!-- Navbar -->
	<div class="navbar">
		<div class="navbar-inner">
			<div class="navbar-container">
				<!-- Navbar Barnd -->
				<div class="navbar-header pull-left">
					<a href="#" class="navbar-brand"> <small> <img
							src="/bsadmin/assets/img/logo.png" alt="" />
					</small>
					</a>
				</div>
				<!-- /Navbar Barnd -->

				<!-- Sidebar Collapse -->
				<div class="sidebar-collapse" id="sidebar-collapse">
					<i class="collapse-icon fa fa-bars"></i>
				</div>
				<!-- /Sidebar Collapse -->
				<!-- Account Area and Settings --->
				<div class="navbar-header pull-right">
					<div class="navbar-account">
						<ul class="account-area">
							<li><a class=" dropdown-toggle" data-toggle="dropdown"
								title="Help" href="#"> <i class="icon fa fa-warning"></i>
							</a> <!--Notification Dropdown-->
								<ul
									class="pull-right dropdown-menu dropdown-arrow dropdown-notifications">
									<li><a href="#">
											<div class="clearfix">
												<div class="notification-icon">
													<i class="fa fa-phone bg-themeprimary white"></i>
												</div>
												<div class="notification-body">
													<span class="title">Skype meeting with Patty</span> <span
														class="description">01:00 pm</span>
												</div>
												<div class="notification-extra">
													<i class="fa fa-clock-o themeprimary"></i> <span
														class="description">office</span>
												</div>
											</div>
									</a></li>
									<li><a href="#">
											<div class="clearfix">
												<div class="notification-icon">
													<i class="fa fa-check bg-darkorange white"></i>
												</div>
												<div class="notification-body">
													<span class="title">Uncharted break</span> <span
														class="description">03:30 pm - 05:15 pm</span>
												</div>
												<div class="notification-extra">
													<i class="fa fa-clock-o darkorange"></i>
												</div>
											</div>
									</a></li>
									<li><a href="#">
											<div class="clearfix">
												<div class="notification-icon">
													<i class="fa fa-gift bg-warning white"></i>
												</div>
												<div class="notification-body">
													<span class="title">Kate birthday party</span> <span
														class="description">08:30 pm</span>
												</div>
												<div class="notification-extra">
													<i class="fa fa-calendar warning"></i> <i
														class="fa fa-clock-o warning"></i> <span
														class="description">at home</span>
												</div>
											</div>
									</a></li>
									<li><a href="#">
											<div class="clearfix">
												<div class="notification-icon">
													<i class="fa fa-glass bg-success white"></i>
												</div>
												<div class="notification-body">
													<span class="title">Dinner with friends</span> <span
														class="description">10:30 pm</span>
												</div>
											</div>
									</a></li>
									<li class="dropdown-footer "><span> Today, March 28 </span> <span
										class="pull-right"> 10°c <i class="wi wi-cloudy"></i>
									</span></li>
								</ul> <!--/Notification Dropdown--></li>
							<li><a class="wave in dropdown-toggle" data-toggle="dropdown"
								title="Help" href="#"> <i class="icon fa fa-envelope"></i> <span
									class="badge">3</span>
							</a> <!--Messages Dropdown-->
								<ul
									class="pull-right dropdown-menu dropdown-arrow dropdown-messages">
									<li><a href="#"> <img
											src="/bsadmin/assets/img/avatars/divyia.jpg"
											class="message-avatar" alt="Divyia Austin">
											<div class="message">
												<span class="message-sender"> Divyia Austin </span> <span
													class="message-time"> 2 minutes ago </span> <span
													class="message-subject"> Here's the recipe for apple pie </span>
												<span class="message-body"> to identify the sending
													application when the senders image is shown for the main
													icon </span>
											</div>
									</a></li>
									<li><a href="#"> <img
											src="/bsadmin/assets/img/avatars/bing.png"
											class="message-avatar" alt="Microsoft Bing">
											<div class="message">
												<span class="message-sender"> Bing.com </span> <span
													class="message-time"> Yesterday </span> <span
													class="message-subject"> Bing Newsletter: The January
													Issue‏ </span> <span class="message-body"> Discover new
													music just in time for the Grammy® Awards. </span>
											</div>
									</a></li>
									<li><a href="#"> <img
											src="/bsadmin/assets/img/avatars/adam-jansen.jpg"
											class="message-avatar" alt="Divyia Austin">
											<div class="message">
												<span class="message-sender"> Nicolas </span> <span
													class="message-time"> Friday, September 22 </span> <span
													class="message-subject"> New 4K Cameras </span> <span
													class="message-body"> The 4K revolution has come over the
													horizon and is reaching the general populous </span>
											</div>
									</a></li>
								</ul> <!--/Messages Dropdown--></li>

							<li><a class="dropdown-toggle" data-toggle="dropdown"
								title="Tasks" href="#"> <i class="icon fa fa-tasks"></i> <span
									class="badge">4</span>
							</a> <!--Tasks Dropdown-->
								<ul
									class="pull-right dropdown-menu dropdown-tasks dropdown-arrow ">
									<li class="dropdown-header bordered-darkorange"><i
										class="fa fa-tasks"></i> 4 Tasks In Progress</li>
									<li><a href="#">
											<div class="clearfix">
												<span class="pull-left">Account Creation</span> <span
													class="pull-right">65%</span>
											</div>

											<div class="progress progress-xs">
												<div style="width: 65%" class="progress-bar"></div>
											</div>
									</a></li>
									<li><a href="#">
											<div class="clearfix">
												<span class="pull-left">Profile Data</span> <span
													class="pull-right">35%</span>
											</div>

											<div class="progress progress-xs">
												<div style="width: 35%"
													class="progress-bar progress-bar-success"></div>
											</div>
									</a></li>
									<li><a href="#">
											<div class="clearfix">
												<span class="pull-left">Updating Resume</span> <span
													class="pull-right">75%</span>
											</div>

											<div class="progress progress-xs">
												<div style="width: 75%"
													class="progress-bar progress-bar-darkorange"></div>
											</div>
									</a></li>
									<li><a href="#">
											<div class="clearfix">
												<span class="pull-left">Adding Contacts</span> <span
													class="pull-right">10%</span>
											</div>

											<div class="progress progress-xs">
												<div style="width: 10%"
													class="progress-bar progress-bar-warning"></div>
											</div>
									</a></li>
									<li class="dropdown-footer"><a href="#"> See All Tasks </a>
										<button
											class="btn btn-xs btn-default shiny darkorange icon-only pull-right">
											<i class="fa fa-check"></i>
										</button></li>
								</ul> <!--/Tasks Dropdown--></li>
							<li><a class="login-area dropdown-toggle" data-toggle="dropdown">
									<div class="avatar" title="View your public profile">
										<img src="/bsadmin/assets/img/avatars/adam-jansen.jpg">
									</div>
									<section>
										<h2>
											<span class="profile"><span>管理员：<?=Yii::$app->user->identity->username?></span></span>
										</h2>
									</section>
							</a> <!--Login Area Dropdown-->
								<ul
									class="pull-right dropdown-menu dropdown-arrow dropdown-login-area">
									<li class="username"><a>David Stevenson</a></li>
									<li class="email"><a>David.Stevenson@live.com</a></li>
									<!--Avatar Area-->
									<li>
										<div class="avatar-area">
											<img src="/bsadmin/assets/img/avatars/adam-jansen.jpg"
												class="avatar"> <span class="caption">Change Photo</span>
										</div>
									</li>
									<!--Avatar Area-->
									<li class="edit"><a href="profile.html" class="pull-left">Profile</a>
										<a href="#" class="pull-right">Setting</a></li>
									<!--Theme Selector Area-->
									<li class="theme-area">
										<ul class="colorpicker" id="skin-changer">
											<li><a class="colorpick-btn" href="#"
												style="background-color: #5DB2FF;"
												rel="/bsadmin/assets/css/skins/blue.min.css"></a></li>
											<li><a class="colorpick-btn" href="#"
												style="background-color: #2dc3e8;"
												rel="/bsadmin/assets/css/skins/azure.min.css"></a></li>
											<li><a class="colorpick-btn" href="#"
												style="background-color: #03B3B2;"
												rel="/bsadmin/assets/css/skins/teal.min.css"></a></li>
											<li><a class="colorpick-btn" href="#"
												style="background-color: #53a93f;"
												rel="/bsadmin/assets/css/skins/green.min.css"></a></li>
											<li><a class="colorpick-btn" href="#"
												style="background-color: #FF8F32;"
												rel="/bsadmin/assets/css/skins/orange.min.css"></a></li>
											<li><a class="colorpick-btn" href="#"
												style="background-color: #cc324b;"
												rel="/bsadmin/assets/css/skins/pink.min.css"></a></li>
											<li><a class="colorpick-btn" href="#"
												style="background-color: #AC193D;"
												rel="/bsadmin/assets/css/skins/darkred.min.css"></a></li>
											<li><a class="colorpick-btn" href="#"
												style="background-color: #8C0095;"
												rel="/bsadmin/assets/css/skins/purple.min.css"></a></li>
											<li><a class="colorpick-btn" href="#"
												style="background-color: #0072C6;"
												rel="/bsadmin/assets/css/skins/darkblue.min.css"></a></li>
											<li><a class="colorpick-btn" href="#"
												style="background-color: #585858;"
												rel="/bsadmin/assets/css/skins/gray.min.css"></a></li>
											<li><a class="colorpick-btn" href="#"
												style="background-color: #474544;"
												rel="/bsadmin/assets/css/skins/black.min.css"></a></li>
											<li><a class="colorpick-btn" href="#"
												style="background-color: #001940;"
												rel="/bsadmin/assets/css/skins/deepblue.min.css"></a></li>
										</ul>
									</li>
									<!--/Theme Selector Area-->
									<li class="dropdown-footer"><a href="/site/logout"
										data-method='post'> Sign out </a></li>
								</ul> <!--/Login Area Dropdown--></li>
							<!-- /Account Area -->
							<!--Note: notice that setting div must start right after account area list.
                                no space must be between these elements-->
							<!-- Settings -->
						</ul>
						<div class="setting">
							<a id="btn-setting" title="Setting" href="#"> <i
								class="icon glyphicon glyphicon-cog"></i>
							</a>
						</div>
						<div class="setting-container">
							<label> <input type="checkbox" id="checkbox_fixednavbar"> <span
								class="text">Fixed Navbar</span>
							</label> <label> <input type="checkbox"
								id="checkbox_fixedsidebar"> <span class="text">Fixed SideBar</span>
							</label> <label> <input type="checkbox"
								id="checkbox_fixedbreadcrumbs"> <span class="text">Fixed
									BreadCrumbs</span>
							</label> <label> <input type="checkbox" id="checkbox_fixedheader">
								<span class="text">Fixed Header</span>
							</label>
						</div>
						<!-- Settings -->
					</div>
				</div>
				<!-- /Account Area and Settings -->
			</div>
		</div>
	</div>
	<!-- /Navbar -->
	<!-- Main Container -->
	<div class="main-container container-fluid">
		<!-- Page Container -->
		<div class="page-container">
			<!-- Page Sidebar -->
			<div class="page-sidebar" id="sidebar">
				<!-- Page Sidebar Header-->
				<div class="sidebar-header-wrapper">
					<input type="text" class="searchinput" /> <i
						class="searchicon fa fa-search"></i>
					<div class="searchhelper">Search Reports, Charts, Emails or
						Notifications</div>
				</div>
				<!-- /Page Sidebar Header -->
				<!-- Sidebar Menu -->
				<ul class="nav sidebar-menu">
                    <?php foreach($menu as $val):?>
                        <li
						<?php if(!empty($val['items']) && in_array($controller,array_column(array_column($val['items'], 'url'),0))):?>
						class='open'
						<?php elseif($controller==$val['url'][0] && empty($val['items'])):?>
						class='active' <?php endif;?>><a href="<?=$val['url'][0]?>"
						class="menu-dropdown"> <i class="menu-icon fa fa-desktop"></i> <span
							class="menu-text"> <?=$val['label'] ?> </span>
                               	<?php if(!empty($val['items'])):?><i
							class="menu-expand"></i><?php endif;?>
                            </a>
							<?php if(!empty($val['items'])):?>
							<?php foreach($val['items'] as $v):?>
                            <ul class="submenu">
							<li <?php if($controller==$v['url'][0]):?> class='active'
								<?php endif;?>><a href="<?=$v['url'][0]?>"> <span
									class="menu-text"><?=$v['label']?></span>
							</a></li>
						</ul>
                            <?php endforeach;?>
                            <?php endif;?>
                        </li>
                    <?php endforeach;?>
                    </ul>
				<!-- /Sidebar Menu -->
			</div>
			<!-- /Page Sidebar -->
			<!-- Page Content -->
			<div class="page-content">
				<div class="page-header position-relative">
					<div class="header-title">
						<h1>
                              <?=Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []])?>
                        </h1>
					</div>
					<!--Header Buttons-->
					<div class="header-buttons">
						<a class="sidebar-toggler" href="#"> <i class="fa fa-arrows-h"></i>
						</a> <a class="refresh" id="refresh-toggler" href=""> <i
							class="glyphicon glyphicon-refresh"></i>
						</a> <a class="fullscreen" id="fullscreen-toggler" href="#"> <i
							class="glyphicon glyphicon-fullscreen"></i>
						</a>
					</div>
					<!--Header Buttons End-->
				</div>
        <?= Alert::widget()?>
        <?= $content?>
                </div>
			<!-- /Page Content -->
		</div>
		<!-- /Page Container -->
		<!-- Main Container -->

	</div>


<?php $this->endBody()?>
    </body>
</html>
<?php $this->endPage()?>
